<extend name="Index/index" />
<block name="nav1">
    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="#">Admin</a>
        </li>
        <li class="active">商品分类管理</li>
    </ul><!-- .breadcrumb -->
</block>

<block name="nav2">
        <h1>
            商品分类管理
        </h1>
</block>
<block name="main">
    <form action="<{:U('search')}>" method="post">
        Name : <input type="text" name="name">
        <input type="submit" value="搜索">
    </form>
    <form action="<{:U('index')}>" method="post">
        <input type="submit" value="取消">
    </form>
    <table class="table table-hover mt20">
        <tr>
            <td>分类ID</td>
            <td>分类名</td>
            <td>父级id</td>
            <td>父级路径</td>
            <td>状态</td>
            <td>操作</td>
            <td></td>
        </tr>
        <foreach name="list" item="v">
        <tr>
            <td><{$v.id}></td>
            <td><{$v.html}><{$v.name}></td>
            <td><{$v['level']+1}>级分类</td>
            <td><{$v.ppath}></td>
            <td>
                <if condition="$v.show eq '1'">显示
                <else />隐藏
                </if>
            </td>
            <td class="col-md-2">
                <a href="<{:U('add',array('pid'=>$v['id']))}>" class="btn btn-primary">添加子分类</a>
            </td>  
            <td class="col-md-2"> 
                <a href="<{:U('edit',array('id'=>$v['id']))}>" class="btn btn-danger">编辑</a>
                <a href="<{:U('del',array('id'=>$v['id']))}>" class="btn btn-danger">删除</a>
            </td>
        </tr>

        </foreach>
    </table>
    <div class="pages"><{$page}></div>
    <script></script>
    </block>
